<template>
  <div>
     <van-nav-bar
      title="标题"
      left-text="返回"
      right-text="按钮"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    />
    <van-address-list
      v-model="chosenAddressId"
      :list="list"
      :disabled-list="disabledList"
      default-tag-text="默认"
      @add="onAdd"
      @edit="onEdit"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      chosenAddressId: "1",
    //   data:null,
      list: [
        {
          id: "1",
          name: "唐晨望",
          tel: "17327197252",
          address:
            "江苏省南京市雨花台区雨花街道花神大道61号景明佳园春景苑10号楼二单元404室",
          isDefault: true,
        },
        {
          id: "2",
          name: "无糖可能",
          tel: "17327197252",
          address:
            "江苏省南京市雨花台区雨花街道花神大道61号景明佳园春景苑10号楼二单元404室",
          isDefault: false,
        },
      ],
      //   超出配送范围
      //   disabledList: [
      //     {
      //       id: '3',
      //       name: '王五',
      //       tel: '1320000000',
      //       address: '浙江省杭州市滨江区江南大道 15 号',
      //     },
      //   ],
    };
  },
  methods: {
    onAdd() {
      Toast("新增地址");
    },
    onEdit(item, index) {
      Toast("编辑地址:" + index);
    },
      onClickLeft() {
      this.$router.push('/my')
    },
    onClickRight() {
      
    },
  },
};
</script>

<style lang="scss" scoped>
</style>